package com.ebao.service.admin.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.ebao.dao.base.IBaseJpaDao;
import com.ebao.po.admin.TAdmin;
import com.ebao.service.admin.IAdminService;
import com.ebao.service.base.impl.CrudServiceImpl;

@Service("adminService")
public class AdminServiceImpl extends CrudServiceImpl<TAdmin> implements IAdminService {

	@Resource(name="adminDao")
	public void setDao(IBaseJpaDao<TAdmin> dao) {  
		super.setDao(dao);
	}

	@Override
	public TAdmin login(String loginName, String password) {
		String jpql = "from TAdmin where realName=? and password=?";
		return dao.getByJpql(jpql, loginName, password);
	}
	

}
